<extend name="Common@Layout:hui-admin" />
<block name="title"><title>Administator管理后台</title></block>
<block name="style">

</block>

<block name="main">
<div class="pd-20">
	<form action="{:u('edit_post')}" method="post" class="form form-horizontal validator_form close-dialog" id="form-article-add">

		<!-- <div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>校区名称：</label>
			<div class="formControls col-8">
			  <span class="select-box inline">
					<select name="did" class="select">
						{$districtoptions}
					</select>
				</span>
			</div>
		</div> -->
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>课程名称：</label>
			<div class="formControls col-6">
			  	<input type="text" class="input-text" value="{$info.title}" placeholder="" name="title"  data-rule="课程名称:required;">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">课程摘要：</label>
			<div class="formControls col-6">
				<textarea name="desc" cols="" rows="" class="textarea"  placeholder="">{$info.desc}</textarea>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">排序值：</label>
			<div class="formControls col-2">
				<input type="text" class="input-text" value="{$info.listorder|default=0}" placeholder="" id="" name="listorder">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>课程介绍：</label>
			<div class="formControls col-6">
			  	<textarea name="content" style="width:700px;height:450px;visibility:hidden;">{$info.content}</textarea>
			</div>
		</div>
		<div class="line mt-10"></div>
		<div class="row cl">
			<label class="form-label col-2">教师1：</label>
			<div class="formControls col-3">
			  <span class="select-box">
				  <select class="select" size="1" name="uid[]">
				    <option value="" selected>请选择教师</option>
				    <volist name="teachers" id="vo">
				    <option value="{$vo.uid}" <if condition="$uid[0] eq $vo['uid']">selected</if>>{$vo.realname}</option>
				    </volist>
				  </select>
				</span>
			</div>
			<div class="col-2"><a class="btn btn-primary radius" onclick="parent.Hui_admin_tab(this)" _href="{:U('teacher/teacheradmin/index')}" data-title="教师列表"><i class="Hui-iconfont"></i> 添加教师</a></div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">教师2：</label>
			<div class="formControls col-3">
			  <span class="select-box">
				  <select class="select" size="1" name="uid[]">
				    <option value="" selected>请选择教师</option>
				    <volist name="teachers" id="vo">
				    <option value="{$vo.uid}" <if condition="$uid[1] eq $vo['uid']">selected</if>>{$vo.realname}</option>
				    </volist>
				  </select>
				</span>
			</div>
		</div>
	  	<div class="row cl">
	    	<div class="col-9 col-offset-2">
	    		<input type="hidden" name="id" value="{$info['id']}"/>
	    		<input type="hidden" name="did" value="{$did}"/>
	      		<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
	    		<button onClick="parent.close_iframe_dialog();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
	    	</div>
	  	</div>
	</form>
</div>
</block>

<block name="script">
<css href="/Public/Sea/modules/kindeditor/src/default.css,/Public/Sea/modules/kindeditor/css/upload.css" />
<js href="/Public/Sea/modules/kindeditor/src/kindeditor-min.js,/Public/Sea/modules/kindeditor/src/lang/zh_CN.min.js" />
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
	
	$('.mini-time').datepicker();

});
var config = {appid:'{$app['app_id']}',appkey:'{$app['app_key']}'};
var uploadurl = '/material/image/upload';
var editor1 = KindEditor.create('textarea[name="content"]',{
	uploadJson : uploadurl,
	allowFileManager : true,
	fileManagerJson : config.fileManagerJson,
	afterBlur: function(){this.sync();}
});
</script>
</block>